from rest_framework.response import Response
from rest_framework.views import APIView

from six_it.models import Enterprise
from xiong_tao169.serializer.enterprise_detail import FirstEnterpriseSerializer


class EnterprisedetailkView(APIView):
    '''企业详情'''

    def get(self, reqeust, id):
        enterprise = Enterprise.objects.get(id=id)
        serializer = FirstEnterpriseSerializer(enterprise)
        return Response(serializer.data)
